This invention relates generally to digital image processing and more particularly to a video camera with electronic pan, tilt and zoom and an adaptive edge sharpening filter.
Video cameras that utilize exclusively solid state components rather than a mechanical movement of lenses and other optical components to pan, tilt, and zoom have numerous economic and functional advantages. An electronic pan, tilt, zoom (xe2x80x9cEPTZxe2x80x9d) camera is small, fast, inexpensive, quiet, reliable, durable, easy to manufacture and easy to upgrade. Cameras with electronic EPTZ features can be used in, for example, cameras incorporated in set-top boxes for video conferencing, in surveillance cameras, camcorders and digital still cameras, among other applications.
A digital EPTZ camera typically has three main independent components: an imager section, a sharpening filter, and a scaling circuit or xe2x80x9cscalerxe2x80x9d. The imager section typically includes a lens and a solid-state imager chip, such as a charge-coupled device (CCD) or a metal-oxide-on-silicon (MOS) type chip. The imager chip includes a plurality of photosensitive areas (that is, picture elements or xe2x80x9cpixelsxe2x80x9d) arranged as a two-dimensional array which is scanned either interlaced or progressively, as is known in the art. Medium resolution imager chips which perform satisfactorily in video set-top applications have, for example, 640 pixels horizontally and 480 pixels vertically. The imager section preferably includes an analog-to digital section to provide digital serial video information. Imager sections and imager chips of this type are well known in the art.
Conventional EPTZ cameras sharpen the image before the image is scaled by the scaler. Virtually all modern imaging systems utilize a standard Laplacian sharpening filter to reduce blurring that results from hardware limitations. The standard Laplacian filter is known in the art and applies a high-pass function to both horizontal and vertical image axes. High-pass filters, however, tend to amplify noise and introduce high-frequency artifacts into the image, such as undershoots and overshoots, which are perceived by the viewer as xe2x80x9chalosxe2x80x9d.
The scaling circuit electronically adapts or xe2x80x9cscalesxe2x80x9d the number of input pixels to match a predetermined output format. For example, video conferencing signals are typically transmitted in the Common Interface Format (CIF) of 352 pixels horizontally and 288 pixels vertically. The imager section described above outputs 640 pixels horizontally and 480 pixels vertically. The scaler has to convert the image to CIF format by xe2x80x9cdown-samplingxe2x80x9d, in this example by a factor of 1.83 horizontally and a factor of 1.67 vertically. The scaler generates the respective new horizontal and vertical CIF addresses and computes new video information, e.g., new luminance (Y) and chrominance (C) values associated with the new addresses. Consequently, the scaler can also be used to perform the pan/tilt and zoom functions in an EPTZ camera.
Conventional EPTZ cameras typically do not sharpen the images after scaling. In particular, zoomed-in images tend to appear blurred. The visual appearance of blurry images is most effectively enhanced by sharpening xe2x80x9cedgesxe2x80x9d in the image. An edge can be defined as a linear arrangement of pixels where the luminance (Y) signal changes significantly in a direction perpendicular to the direction of the linear pixel arrangement.
It is therefore an object of the present invention to provide an adaptive edge sharpening apparatus and method which sharpens an image without significantly amplifying noise.
It is a further object of the present invention to adapt the parameters used in the sharpening algorithm to the scaling ratio of the image. It is still another object of the invention to prevent overshoot and undershoot of the sharpened pixel values.
The adaptive edge-sharpening apparatus of the invention includes a conventional electronic imager section with an image sensor having pixels; a scaler which converts the pixel addresses of the electronic image or a portion thereof, i.e., a zoomed image, and the luminance (Y) and chrominance (C) values associated with these pixel addresses to output values conforming to a predetermined output format, such as the CIF format; preferably an edge detector for determining the location and orientation of an edge in the output pixels; a sharpening filter or xe2x80x9csharpenerxe2x80x9d for sharpening the output pixels depending on characteristic properties of the edge; and a xe2x80x9cclippingxe2x80x9d device which clips the luminance (Y) values of the sharpened pixel so as to fall between the smallest unsharpened numerical value and the greatest unsharpened numerical value, respectively, of the pixels located within a neighborhood of the sharpened pixel. A neighborhood of a pixel includes one or more pixels adjacent to the pixel and may also include the pixel itself. The clipping device which is a central feature of the present invention, therefore eliminates objectionable undershoots and overshoots which are commonly associated with high-pass filters, as discussed above.
In an advantageous embodiment, the edge detector detects for each edge pixel an edge orientation. Depending on the specific edge filter used, the edge detector, for example, determines if an edge is oriented horizontally, vertically, or at an angle with respect to the horizontal. Preferably only those pixels located on a line perpendicular to the edge orientation are subsequently used to sharpen the edge pixels.
In another advantageous embodiment, for each image a numerical threshold value is provided for locating and selecting edge pixels. The threshold value preferably depends on the scaling ratio used in the scaler (in the present example the scaling ratio is between approximately 0.5 and 2.0), but can also depend on other camera settings, such the pan and tilt position (reflecting the diminished performance of most optical systems away from the optical axis) and possibly also on the lighting conditions (low lighting introduces more noise). For example, the threshold value is preferably relatively small for a large magnification and relatively large for a small magnification. Alternatively, the threshold value can also be provided by the user.
In still another advantageous embodiment, a sharpening parameter is provided for controlling the sharpening. Like the threshold value, the sharpening parameter can also depend on the scaling ratio and the camera settings.
In yet another advantageous embodiment, pixels which form a local maximum or minimum and which therefore are not located on an edge, are not sharpened. Local maxima or minima can either be determined separately before the pixels are sharpened and subsequently excluded from being sharpened which, however, requires an additional computational step. Alternatively, pixels representing local maxima or minima will be left unsharpened if they are counted as being part of the neighborhood of pixels, because no pixel is allowed to exceed or fall below the value of any unsharpened pixel in the neighborhood of that pixel.
In still another advantageous embodiment, pixels can also be sharpened without edge detection, using the same Laplacian sharpening algorithm, and subsequently clipped.
The invention furthermore includes a method for adaptively detecting and sharpening the edges in images and for clipping sharpened pixel values so that they fall between the smallest unsharpened numeric values and the greatest unsharpened numeric values, respectively, of the pixels located within the neighborhood of the sharpened pixels.